{* Smarty *}

<b class="title">Public Relations</b><br />
<br />
<form action="?path=newslinelist,public_relations" method="post" enctype="multipart/form-data" >
<table align="left" cellpadding="0" cellspacing="0" border=0  >
    <tr>
        <td  align="center" style="border: solid 1px #444444;" >
			<div style="padding:3;" >
				#
			</div>
		</td>
		<td  align="center" style="border: solid 1px #444444;" >
			<div style="padding:3;" >
				Active
			</div>
		</td>
		<td  align="center" style="border: solid 1px #444444;" >
			<div style="padding:3;" >
				Image
			</div>
		</td>
		<td  align="center" style="border: solid 1px #444444;" >
			<div style="padding:3;" >
				File
			</div>
		</td>
		<td  align="center" style="border: solid 1px #444444;" >
			<div style="padding:3;" >
				Action
			</div>
		</td>
    </tr>
{if count($public_relations)}	
{foreach from=$public_relations item=item}
	<tr>
		<td  align1="right" class="light" style="border: solid 1px #aaaaaa;">
			<div style="padding:3;" >
				{$item.id} 
			</div>
		</td>
		<td align="center" class="light" style="border: solid 1px #aaaaaa;" >
			<div style="padding:3;" >
				<input type="checkbox" name="is_active[{$item.id}]" value="ok" {if $item.is_active == "1"}checked{/if}>
			</div>
		</td>
		<td  valign="bottom" align1="right"  class="light" style="border: solid 1px #aaaaaa;">
			<div style="padding:3;" >
				 {if $item.img!=""}<img src="../pdf/{$item.img}"><br>{else}<img style="padding:3;" src="../pdf/no_image.jpg"><br>{/if}
				 <input type="file" size="50" name="img[{$item.id}]">
			 </div>
		</td>
		<td  valign="bottom" align1="right"  class="light" style="border: solid 1px #aaaaaa;">
			<div style="padding:3;" >
				{if $item.file!=""}<div style="padding: 3;"><a href="../pdf/{$item.file}" target="pdf">{$item.file}</a></div><br>{else}<div style="padding: 3;">No File</div><br>{/if}
				<input type="file" size="50" name="file[{$item.id}]">
			</div>
		</td>
		<td   valign="middle" align="center"  class="light" style="border: solid 1px #aaaaaa;" >
			<div style="padding:3;" >
				<a href="?path=newslinelist,public_relations&del={$item.id}">Delete</a>
			</div>
		</td>
	</tr>	
{/foreach}
{else}
	<tr>
		<td colspan="5" align="center" style1="border: solid 1px #444444;" class="light">
			<div  align="left" style="padding:3;" >
				No items collected yet.
			</div>
		</td>
	</tr>
{/if}
	<tr>
        <td colspan="5" align="center" style1="border: solid 1px #444444;" class="light">
			<div  align="right" style="padding:3;" >
				{if count($public_relations)}<input type="submit" name="submit" value="Apply changes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{/if}
				<input type="button" value="Add new" onclick="document.forms['f_add'].submit();">
			</div>
		</td>
    </tr>
</table><br><br>
</form>

<form name="f_add" action="?path=newslinelist,public_relations" method="post" >
	<input type="hidden" name="add">
</form>
